﻿<%@ Page Title="Trang chủ" Language="C#" MasterPageFile="~/ExtendedPage.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CuaHangLego.Webform.Default" culture="auto" uiculture="auto" %>

<asp:Content ID="Content2" ContentPlaceHolderID="Products" runat="server">
    <!-- Begin updatepanel -->
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <asp:Panel ID="Panel1" runat="server" CssClass="NormalPanel">
        <asp:DropDownList ID="SortBy" runat="server" AutoPostBack="true" OnSelectedIndexChanged="SortBy_SelectedIndexChanged">
            <asp:ListItem Value="0" Text="----- Sắp xếp theo -----" Selected="True" />
            <asp:ListItem Value="1" Text="Giá bán từ thấp đến cao" />
            <asp:ListItem Value="2" Text="Giá bán từ cao đến thấp" />
            <asp:ListItem Value="3" Text="A -> Z" />
            <asp:ListItem Value="4" Text="Z -> A" />
        </asp:DropDownList>
        
        <asp:DropDownList ID="PriceGroup" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PriceGroup_SelectedIndexChanged">
            <asp:ListItem Value="0" Text="----- Chọn mức giá -----" Selected="True" />
            <asp:ListItem Value="1" Text="Dưới 500.000" />
            <asp:ListItem Value="2" Text="500.000 -> 1.000.000" />
            <asp:ListItem Value="3" Text="1.000.000 -> 5.000.000" />
            <asp:ListItem Value="4" Text="5.000.000 -> 10.000.000" />
            <asp:ListItem Value="5" Text="Trên 10.000.000" />
        </asp:DropDownList>

        <asp:DropDownList ID="PieceGroup" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PieceGroup_SelectedIndexChanged">
            <asp:ListItem Value="0" Text="----- Chọn số mành ghép -----" Selected="True" />
            <asp:ListItem Value="1" Text="Dưới 50" />
            <asp:ListItem Value="2" Text="50 -> 100" />
            <asp:ListItem Value="3" Text="100 -> 500" />
            <asp:ListItem Value="4" Text="500 -> 1000" />
            <asp:ListItem Value="5" Text="Trên 1000" />
        </asp:DropDownList>
        <asp:Panel ID="Panel2" runat="server" CssClass="ViewType">
            <asp:ImageButton ID="GridViewButton" ImageUrl="~/img/gridview.png" runat="server" OnClick="GridViewButton_Click" />
            <asp:ImageButton ID="ListViewButton" ImageUrl="~/img/listview.png" runat="server" OnClick="ListViewButton_Click" />
        </asp:Panel>
    </asp:Panel>
    <asp:Label Text="Không tìm thấy sản phẩm nào!" ID="NoResultLable" runat="server" />
    <div style="clear:both" />
    <asp:Repeater id="DanhsachSanPham" runat="server" OnItemCommand="listSP1_ItemCommand" OnItemDataBound="listSP1_ItemDataBound">
        <ItemTemplate>
            <div class="oneproduct">
                <asp:HyperLink runat="server" ID="ProductLink" CssClass="ProductLink">
                    <div class="productimage"><asp:Image ID="Image1" ImageUrl='<%# String.Format("img/{0}", DataBinder.Eval(Container.DataItem, "HinhAnh")) %>' CssClass="ProductImage" runat="server" meta:resourcekey="ImageResource1" /></div>
                    <div class="productname"><asp:Label ID="TenSP" runat="server" CssClass="ProductName" Text='<%# DataBinder.Eval(Container.DataItem, "Ten") %>' meta:resourcekey="TenSPResource1"/></div>
                </asp:HyperLink><div class="addtocart"/><span class="productprice"><asp:Label ID="GiaBan" runat="server" Text='<%# String.Format(System.Globalization.CultureInfo.CreateSpecificCulture("vi-VN"), "{0:n0}.000", (int)DataBinder.Eval(Container.DataItem, "GiaBan")) %>' meta:resourcekey="GiaBanResource1" /></span><asp:LinkButton ToolTip="Thêm vào giỏ hàng" ID="GioHang" runat="server" Text='+' OnCommand="GioHang_Command" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "MaSo") %>' CssClass="BuyButton" /></div>
                <asp:HiddenField ID="ProductID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "MaSo") %>' />
            </div>
        </ItemTemplate>
    </asp:Repeater>
            

    
    <asp:Repeater id="DanhsachSanPham2" runat="server" OnItemCommand="DanhsachSanPham2_ItemCommand" OnItemDataBound="DanhsachSanPham2_ItemDataBound">
        <ItemTemplate>
            <asp:Panel ID="Panel3" runat="server" CssClass="ListViewProductPanel">
                <asp:HyperLink runat="server" ID="ListViewProductLink" CssClass="ProductLink">
                    <div class="ListViewProductPanelL">
                        <div class="recentImg">
                            <asp:Image ID="Image1" Height="90px" ImageUrl='<%# String.Format("../img/{0}", DataBinder.Eval(Container.DataItem, "HinhAnh")) %>' CssClass="ProductImage2" runat="server" meta:resourcekey="ImageResource1" />
                        </div>
                        <div class="recentInfo">
                            Mã số: <asp:Label ID="Label5" runat="server" CssClass="ProductName" Text='<%# DataBinder.Eval(Container.DataItem, "MaSo") %>' meta:resourcekey="TenSPResource1"/><br />
                            Tên: <asp:Label ID="TenSP" runat="server" CssClass="ProductName" Text='<%# DataBinder.Eval(Container.DataItem, "Ten") %>' meta:resourcekey="TenSPResource1"/><br />
                            Chủ đề: <asp:Label ID="Label1" runat="server" CssClass="ProductName" Text='<%# DataBinder.Eval(Container.DataItem, "ChuDe") %>' meta:resourcekey="TenSPResource1"/><br />
                            Số mảnh ghép: <asp:Label ID="Label2" runat="server" CssClass="ProductName" Text='<%# DataBinder.Eval(Container.DataItem, "SoManhGhep") %>' meta:resourcekey="TenSPResource1"/><br />
                            Ngày sản xuất: <asp:Label ID="Label3" runat="server" CssClass="ProductName" Text='<%# DataBinder.Eval(Container.DataItem, "NgaySX") %>' meta:resourcekey="TenSPResource1"/><br />
                            Bảo hành: <asp:Label ID="Label4" runat="server" CssClass="ProductName" Text='<%# DataBinder.Eval(Container.DataItem, "BaoHanh") %>' meta:resourcekey="TenSPResource1"/><br />
                        </div>
                    </div>

                    <div class="ListViewProductPanelR">
                        <div class="addtocart" ><span class="productprice"><asp:Label ID="GiaBan" runat="server" Text='<%# String.Format(System.Globalization.CultureInfo.CreateSpecificCulture("vi-VN"), "{0:n0}.000", (int)DataBinder.Eval(Container.DataItem, "GiaBan")) %>' meta:resourcekey="GiaBanResource1" /></span><asp:LinkButton CssClass="BuyButton" ToolTip="Thêm vào giỏ hàng" ID="GioHang" runat="server" Text='+' OnCommand="GioHang_Command" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "MaSo") %>' /></div>
                        <asp:HiddenField ID="ProductID2" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "MaSo") %>' />
                    </div>
                </asp:HyperLink></asp:Panel></ItemTemplate></asp:Repeater><div style="clear:both" /><asp:Panel ID="Panel4" runat="server" CssClass="FloatRight">
        <asp:PlaceHolder ID="plcPaging" runat="server" />
    </asp:Panel>

    </ContentTemplate>
    </asp:UpdatePanel>
    <!-- End updatepanel -->
        

    <!-- Wizard -->
</asp:Content>